<div class="form container" id="edit-site">
	<h1><?php if ( isset($site->site_id) ) echo 'Edit website'; else echo 'Add new website'; ?></h1>
	<div class="content">
	<form method="post" action="sites.php">
	<input type="hidden" name="action" value="save"/>
	<input type="hidden" name="site_id" value="<?php echo $site->site_id; ?>"/>
	<table>
	<tr><th scope="row">Site Name</th><td><input type="text" name="site_name" value="<?php echo $site->site_name; ?>" size="40" /></td></tr>	
	<tr><th scope="row">Site <acronym title="Uniform Resource Locator">URL</acronym></th><td><input type="text" name="site_url" value="<?php echo $site->site_url; ?>" size="40" /><br /><div class="indent"><input type="checkbox" name="ignore_www" id="ignore_www" value="y"<?php if ( empty($site->ignore_www) || strcmp($site->ignore_www, 'y') == 0 ) echo ' checked="checked"'; ?> /> <label for="ignore_www">www is optional</label><br /><input type="checkbox" name="match_subdomains" id="match_subdomains"<?php if ( strcmp($site->match_subdomains, 'y') == 0 ) echo ' checked="checked"'; ?> /> <label for="match_subdomains">Match all subdomains</label></div></td></tr>
	
	<tr><th scope="row">Site Downloads</th><td><input type="checkbox" name="track_downloads" id="track_downloads" value="y"<?php if ($track_site->option_value=='y') echo ' checked="checked"'; ?> /> <label for="track_downloads">Track Downloads</label>
	<div id="tracked_extensions_div">
		<div class="indent">Enter extensions you wish<br />to track separated by comma (,)<br /><input type="text" id="tracked_extensions" name="tracked_extensions" value="<?php if ($track_site_extensions->option_value!="") foreach (unserialize($track_site_extensions->option_value) as $extension) { $extensions .= $extension.","; } echo substr($extensions,0,-1);  ?>" size="40" />
		</div>
	</div>
	</td></tr>
	

	
	<tr><th scope="row"><abbr title="Universal Coordinated Time">UTC</abbr> offset</th><td>
	<select name="utc_offset" id="timezone">
					<option value="<?= formatGMT($site->utc_offset); ?>" selected>Current: <?= formatGMT($site->utc_offset); ?></option>
					
					<option value="-12">-12:00 International Date Line West</option>

					<option value="-11">-11:00 Midway Island, Samoa</option>
					<option value="-10">-10:00 Hawaii</option>
					<option value="-9">-09:00 Alaska</option>
					<option value="-8">-08:00 Pacific Time (US &amp; Canada); Tijuana</option>
					<option value="-7">-07:00 Arizona</option>

					<option value="-7">-07:00 Chihuahua, La Paz, Mazatlan</option>
					<option value="-7">-07:00 Mountain Time (US &amp; Canada)</option>
					<option value="-6">-06:00 Central America</option>
					<option value="-6">-06:00 Central Time (US &amp; Canada)</option>
					<option value="-6">-06:00 Guadalajara, Mexico City, Monterrey</option>

					<option value="-6">-06:00 Saskatchewan</option>
					<option value="-5">-05:00 Bogota, Lima, Quito</option>
					<option value="-5">-05:00 Eastern Time (US &amp; Canada)</option>
					<option value="-5">-05:00 Indiana (East)</option>
					<option value="-4">-04:00 Atlantic Time (Canada)</option>

					<option value="-4">-04:00 Caracas, La Paz</option>
					<option value="-4">-04:00 Santiago</option>
					<option value="-3">-03:30 Newfoundland</option>
					<option value="-3">-03:00 Brasilia</option>
					<option value="-3">-03:00 Buenos Aires, Georgetown</option>
					<option value="-3">-03:00 Greenland</option>

					<option value="-2">-02:00 Mid-Atlantic</option>
					<option value="-1">-01:00 Azores</option>
					<option value="-1">-01:00 Cape Verde Is.</option>
					<option value="0">+00:00 Casablanca, Monrovia</option>
					<option value="0">+00:00 GMT: Dublin, Edinburgh, Lisbon, London</option>
					<option value="0">+01:00 Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option>

					<option value="1">+01:00 Belgrade, Bratislava, Budapest, Ljubljana, Prague</option>
					<option value="1">+01:00 Brussels, Copenhagen, Madrid, Paris</option>
					<option value="1">+01:00 Sarajevo, Skopje, Warsaw, Zagreb</option>
					<option value="1">+01:00 West Central Africa</option>
					<option value="2">+02:00 Athens, Beirut, Istanbul, Minsk</option>
					<option value="2">+02:00 Bucharest</option>

					<option value="2">+02:00 Cairo</option>
					<option value="2">+02:00 Harare, Pretoria</option>
					<option value="2">+02:00 Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option>
					<option value="2">+02:00 Jerusalem</option>
					<option value="3">+03:00 Baghdad</option>
					<option value="3">+03:00 Kuwait, Riyadh</option>

					<option value="3">+03:00 Moscow, St. Petersburg, Volograd</option>
					<option value="3">+03:00 Nairobi</option>
					<option value="3">+03:30 Tehran</option>
					<option value="4">+04:00 Abu Dhabi, Muscat</option>
					<option value="4">+04:00 Baku, Tbilisi, Yerevan</option>
					<option value="4">+04:30 Kabul</option>

					<option value="5">+05:00 Ekaterinburg</option>
					<option value="5">+05:00 Islamabad, Karachi, Tashkent</option>
					<option value="5">+05:30 Chennai, Kolkata, Mumbai, New Delhi</option>
					<option value="5">+05:45 Kathmandu</option>
					<option value="6">+06:00 Almaty, Novosibirsk</option>
					<option value="6">+06:00 Astana, Dhaka</option>

					<option value="6">+06:00 Sri Jayawardenepura</option>
					<option value="6">+06:30 Rangoon</option>
					<option value="7">+07:00 Bangkok, Hanoi, Jakarta</option>
					<option value="7">+07:00 Krasnoyarsk</option>
					<option value="8">+08:00 Beijing, Chongqing, Hong Kong, Urumqi</option>
					<option value="8">+08:00 Irkstsk, Ulaan Bataar</option>

					<option value="8">+08:00 Kuala Lumpur, Singapore</option>
					<option value="8">+08:00 Perth</option>
					<option value="8">+08:00 Taipei</option>
					<option value="9">+09:00 Osaka, Sapporo, Tokyo</option>
					<option value="9">+09:00 Seoul</option>
					<option value="9">+09:00 Yakutsk</option>

					<option value="9">+09:30 Adelaide</option>
					<option value="9">+09:30 Darwin</option>
					<option value="10">+10:00 Brisbane</option>
					<option value="10">+10:00 Canberra, Melbourne, Sydney</option>
					<option value="10">+10:00 Guam, Port Moresby</option>
					<option value="10">+10:00 Hobart</option>

					<option value="10">+10:00 Vladivostok</option>
					<option value="11">+11:00 Magadan, Soloman Is., New Caledonia</option>
					<option value="12">+12:00 Auckland, Wellington</option>
					<option value="12">+12:00 Fiji, Kamchatka, Marshall Is.</option>
					<option value="13">+13:00 Nuku'alofa</option>
				</select>
				<p><abbr title="Universal Coordinated Time">UTC</abbr> time is <strong><?php echo gmdate('Y-m-d g:i:s a'); ?></strong><br /></p>
	</td></tr>
	</table>
	<p class="buttons"><input type="submit" value="Save changes &raquo;"/></p>
	</form>
	</div>
</div>